<?php
	use yii\helpers\Html;
	use yii\helpers\Url;
	use yii\widgets\ActiveForm;
	use yii\widgets\LinkPager;
?>
<style>
	.status-1 {
		background-color: #999;
	}
	.status-2 {
		background-color: #FFF;
	}
	.status-3 {
		background-color: #FF0;
	}
	.status-4 {
		background-color: #06F;
	}
	.status-5 {
		background-color: #C00;
	}
</style>
<div class="page-header">
	<h1>
		房源管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			统计查询
		</small>
	</h1>
	<div class="nav-search" style="right:126px;top:10px;" id="nav-search">
		<?php $form = ActiveForm::begin([
			'enableClientValidation' => true,
			'method' => 'post',
			'options' => ['class' => 'form-search'],
		])?>
			<span class="input-icon">
				<input type="date" name="Gree[addtime]" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
				<i class="ace-icon fa fa-search nav-search-icon"></i>
				<input type="submit" style="padding-right: 22px;margin-left: 20px;background: #438EB9;color: white;border: none;border-radius: 5px;" value="查找">
			</span>
		<?php ActiveForm::end();?>

	</div>
</div><!-- /.page-header -->

<!-- PAGE CONTENT BEGINS -->
<div class="row">
	<div class="col-xs-12">
		<table id="simple-table" class="table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th class="center">序号</th>
					<th class="hidden-480 cneter">房间号</th>
					<th>筹号</th>
					<th>房间状态</th>
					<th class="hidden-480">销控时间</th>
					<th>认购业务员</th>

				</tr>
			</thead>

			<tbody>
				<?php $i="1"?>
				<?php foreach($model as $mod):?>
					<tr>
						<th><?php echo $i;?></th>
						<th><?php echo $mod->rid;?></th>
						<th><?php echo $mod->raseno;?></th>
						<th class="status-<?php echo $mod->status;?>"></th>
						<th><?php echo date('Y-m-d,h:i:s',$mod->addtime);?></th>
						<th><?php echo $mod->saleman;?></th>
					</tr>
				<?php $i++;?>
				<?php endforeach;?>
			</tbody>
		</table>
				<?= LinkPager::widget(['pagination'=>$pages]);?>
	</div><!-- /.span -->
</div><!-- /.row -->

<script type="text/javascript">
	function del(id){
		if(window.confirm('确认要删除么?')){
			window.location.href = "<?php echo Url::toRoute(['content/del'])?>&id="+id;
		}
	}
</script>
<div class="hr hr-18 dotted hr-double"></div>